package com.liurong.quartz.util;

public class JobMonitorUtil {
	/**
	 * 暂停定时任务
	 */
	public static final String STOP_ACTION = "stop";

	/**
	 * 开启定时任务
	 */
	public static final String START_ACTION = "start";

	/**
	 * 手动启动定时任务
	 */
	public static final String HAND_START_ACTION = "handStart";

	/**
	 * 修改cron
	 */
	public static final String CHANGE_CRON_ACTION = "changeCron";

	public static String getJobLqueueStr(String ip) {
		StringBuilder keySB = new StringBuilder();
		keySB.append("lisenterJob");
		keySB.append(":");
		keySB.append(ip);
		return keySB.toString();
	}

	public static String getJobLqueueValueStr(String jobName, String action) {
		StringBuilder valueSB = new StringBuilder();
		valueSB.append(jobName);
		valueSB.append(":");
		valueSB.append(action);
		return valueSB.toString();
	}
}
